//
// Created by wuzhe on 2022/4/28.
//

#include "SlaveState.h"
#include "../Slave.h"
#include "../Console.h"
#include <sstream>

SlaveState *SlaveState::getAck() {
    return nullptr;
}

SlaveState *SlaveState::getERR() {
    return nullptr;
}

SlaveState::SlaveState(Slave& slave):slave(slave) {

}

SlaveState *SlaveState::getSendRoom(std::string roomName) {
    return nullptr;
}

SlaveState *SlaveOfflineState::getAck() {
    INFO("slave state: offline->online");
}

SlaveState *SlaveOfflineState::getERR() {

}

SlaveState *SlaveOfflineState::getSendRoom(std::string roomName) {
    std::stringstream ss;
    ss << "slave state: SendRoom:";
    slave.createRoom(roomName);
    INFO(ss.str());

}
